<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/common/taglib.jsp"%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>房产管理系统</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<link rel="stylesheet" href="${ctx}/resources/bootstrap/css/bootstrap.min.css" />
		<link rel="stylesheet"  href="${ctx}/resources/ace/css/font-awesome.min.css" />
		<link rel="stylesheet"  href="${ctx}/resources/ace/css/ace.min.css" />
		<link rel="stylesheet"  href="${ctx}/resources/ace/css/ace-skins.min.css" />
		<link rel="stylesheet"  href="${ctx}/resources/ace/css/ace-rtl.min.css" />
		<link rel="stylesheet" href="${ctx}/resources/ace/css/ace-responsive.min.css" />
		<script type="text/javascript" src="${ctx}/resources/js/jquery-1.12.4.min.js"></script>
		<script type="text/javascript" src="${ctx}/resources/bootstrap/js/bootstrap.min.js"></script>
		<script type="text/javascript"  src="${ctx}/resources/ace/js/ace-extra.min.js"></script>
		<script type="text/javascript" src="${ctx}/resources/ace/js/ace-elements.min.js"></script>
		<script type="text/javascript" src="${ctx}/resources/ace/js/ace.min.js"></script>
		<script type="text/javascript" src="${ctx}/resources/js/bootbox.min.js"></script>
		<script type="text/javascript">
			function siMenu(id,liId,menuUrl,menuName,subMenuName){
				$("#mainFrame").attr("src","${ctx}/"+menuUrl);
				$("#activeMenuName").text(menuName);
				$("#activeSubMenuName").text(subMenuName);
				$(".active").removeClass();
				$("#"+id).attr("class","active");
				$("#"+liId).attr("class","active open");
			}
			
			$(function() {
				$("#mainPage").height($(window).height());
			})
			
			function modifyPassword(){
				bootbox.dialog({
				        message: '<form class="form-horizontal" role="form" id="_form"><div class="form-group"><label for="password" class="col-sm-3 control-label">密码</label><div class="col-sm-9"><input class="form-control" id="password" name="password" type="password" placeholder="请输入密码"></input></div></div></form>',
				        title: "修改密码 ",
				        buttons:{             
				            "success" :{
				                "label" : "<i class='icon-ok'></i> 确定",
				                "className" : "btn-sm btn-success",
				                "callback": function() {
				                    $.ajax({
				                        type: "POST",
				                        url: "${ctx}/modifyPassWord.do",
				                        data: {"password":$("#password").val()},
				                        dataType:'json',
				                        cache: false,
				                        success: function(data){
				                       		alert(data);
				                        }
			                        });
				                }
				            },
				            "cancel": {
				            	"label" : "<i class='icon-info'></i> 取消",
				            	"className" : "btn-sm btn-danger"
				            } 
				        }
				          
				    });
			}
			
			function personInfo(){
				$.ajax({
                    type: "POST",
                    url: "${ctx}/personInfo.do",
                    data: {},
                    dataType:'json',
                    cache: false,
                    success: function(data){
                    	if(data){
                    		var a='<form class="form-horizontal" role="form" id="_form">'+
                   		    '<div class="form-group"><label for="loginName" class="col-sm-2 control-label" style="text-align:left;">登录名</label>'+
					    	'<div class="col-sm-8"><input type="text" value="'+data.loginName+'" name="loginName" id="loginName" class="form-control" readonly="readonly"/></div></div>'+
					    	'<div class="form-group"><label for="name" class="col-sm-2 control-label" style="text-align:left;">姓名</label>'+
					    	'<div class="col-sm-8"><input type="text" value="'+data.name+'" name="name" id="name" class="form-control" readonly="readonly"/></div></div>'+
							'<div class="form-group"><label for="email" class="col-sm-2 control-label" style="text-align:left;">邮箱</label>'+
					    	'<div class="col-sm-8"><input type="text" value="'+data.email+'" name="email" id="email" class="form-control" readonly="readonly"/></div></div>'+
					    	'<div class="form-group"><label for="phone" class="col-sm-2 control-label" style="text-align:left;">电话</label>'+
					    	'<div class="col-sm-8"><input type="text" value="'+data.phone+'" name="phone" id="phone" class="form-control" readonly="readonly"/></div></div>'+
							'<div class="form-group"><label for="mobile" class="col-sm-2 control-label" style="text-align:left;">手机</label>'+
					    	'<div class="col-sm-8"><input type="text" value="'+data.mobile+'" name="mobile" id="mobile" class="form-control" readonly="readonly"/></div></div>'+
							'</form>';
                    		bootbox.dialog({
        				        message: a,
        				        title: "个人信息",
        				        buttons:{             
        				            "success" :{
        				                "label" : "<i class='icon-ok'></i> 确定",
        				                "className" : "btn-sm btn-success",
        				            },
        				            "cancel": {
        				            	"label" : "<i class='icon-info'></i> 取消",
        				            	"className" : "btn-sm btn-danger"
        				            } 
        				        }
        				          
        				    });
                    	}
                   		
                    }
                });
			}
		</script>
	</head>

	<body>
		<!-- 页面顶部¨ -->
		<%@ include file="head.jsp"%>
		<div class="main-container" id="main-container">
			<div class="main-container-inner">
				<a class="menu-toggler" id="menu-toggler" href="#">
					<span class="menu-text"></span>
				</a>

				<div class="sidebar" id="sidebar" style="height:100%;">
					<%@ include file="left.jsp"%>
				</div>

				<div class="main-content" style="height:100%;">
					<!-- 页面顶部¨ -->
					<div class="breadcrumbs" id="breadcrumbs">
						<ul class="breadcrumb">
							<li>
								<i class="icon-home home-icon"></i>
								<a id="activeMenuName" style="font-size:medium;font-weight:bold;">首页</a>
							</li>
							<li class="active"><a id="activeSubMenuName" style="font-size:small;font-weight:bold;">控制台</a></li>
						</ul><!-- .breadcrumb -->
					</div>
					<div class="page-content" id="mainPage"  style="width:100%;height:100%;padding:1px;">
						<iframe name="mainFrame" id="mainFrame"  frameborder="0" marginheight="0" marginwidth="0" 	scrolling="yes" style="width:100%;height:100%;"></iframe>
					</div><!-- /.page-content -->
				</div><!-- /.main-content -->
			</div><!-- /.main-container-inner -->

			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="icon-double-angle-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->
</body>
</html>

